<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html>
<html>
<head>
<title>兑换管理</title>
<%@include file="../collect/meta.jsp"%>
<link rel="stylesheet" href="css/radius.css" type="text/css"></link>
<link rel="stylesheet" href="css/table.css" type="text/css"></link>
<script type="text/javascript" src="${ctx}/js/returnTop.js"></script>
</head>
<body lang="zh-cn">
	<div class="wrapper">
		<c:import url="/collect/top.jsp"></c:import>
		<div class="main-container" id="main-container">
			<div class="main-container-inner">
				<c:import url="/collect/left.jsp"></c:import>
				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<ul class="breadcrumb">
							<li><i class="icon-home home-icon"></i>商品兑换</li>
							<li>兑换管理</li>
						</ul>
						<!-- .breadcrumb -->
					</div>
					<div class="page-content">
						<div class="row">
							<div class="col-xs-12">
								<div class="alert alert-success">
									商品总数:
									<s:property value="totalSize" />
									条
								</div>

								<table id="table_bug_report"
									class="table table-striped table-bordered table-hover table-condensed">
									<tr>
										<th>编号</th>
										<th>商品名称</th>
										<th>价格</th>
										<th>状态</th>
										<th>有效天数</th>
										<th>数量</th>
										<th>创建时间</th>
										<th>商品描述</th>
										<th>操作</th>
									</tr>
									<s:iterator value="tariffs">
										<tr>
											<td><s:property value="tariffId" />
											</td>
											<td><s:property value="goods.goodsName" />
											</td>
											<td><s:property value="fee" />
											</td>
											<td><s:property value="status" />
											</td>
											<td><s:property value="validDays" />
											</td>
											<td><s:property value="amount" />
											</td>
											<td><s:property value="createDate" />
											</td>
											<td><s:property value="description" />
											</td>
											<td><a id="del" class="btn btn-sm btn-primary radius"
												href="tariffaction!Delete?id=<s:property value="tariffId" />">删除</a>
												<!-- <button type="button" class="btn btn-sm btn-primary radius">编辑</button> -->
											</td>
										</tr>
									</s:iterator>
								</table>
								<div class="row" id="page">
									<ul class="pagination">
										<li><a href="tariffaction!getList?index=1">首页</a></li>
										<li class="prev"><a
											href="tariffaction!getList?index=${index-1}"> <i
												class="icon-double-angle-left"></i> </a>
										</li>
										<!-- <li>
								            <a href="smsLog!getList?index=${index-1}">上一页</a>
								        </li> -->
										<li><a href="javascript:void(0)">${index }</a></li>
										<!-- <li>
									     	<a href="smsLog!getList?index=${index+1}">下一页</a>
									     </li> -->
										<li><a href="tariffaction!getList?index=${index+1}">
												<i class="icon-double-angle-right"></i> </a>
										</li>
										<li><a href="tariffaction!getList?index=${page}">末页</a></li>
										<li><a href="javascript:void(0)">共${page}页</a></li>
									</ul>
								</div>

							</div>
							<!-- /.col -->
						</div>
						<!-- /.row -->
					</div>
					<!-- /.page-content -->
				</div>
				<!-- /.main-content -->
			</div>
			<!-- /.main-container-inner -->
			<a href="#" id="btn-scroll-up"
				class="btn-scroll-up btn btn-sm btn-inverse"
				style="position:fixed;bottom:0;"><i
				class="icon-double-angle-up icon-only bigger-110"></i> </a>
		</div>
		<!-- /.main-container -->
		<div class="push"></div>
	</div>
	<c:import url="/collect/down.jsp"></c:import>
	<!-- 弹出框（Modal） -->
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content radius">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">
						操作提示</h4>
				</div>
				<div class="modal-body">
					<p>确定删除此记录吗？</p>
				</div>
				<div class="modal-footer radius">
					<a id="confirm" class="btn btn-primary btn-sm radius">确定</a>
					<button type="button" class="btn btn-sm btn-default radius"
						data-dismiss="modal">取消</button>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal -->
	</div>
</body>
<script type="text/javascript">
	$(document).ready(function() {
		//防收回
		$('.yunying > ul').show();
		$('.yunying > ul > li > a').eq(2).css("color", "red");
	});
	//提示框中确定按钮绑定删除事件
	$(function() {
		$("a#del").click(function() {
			var href = $(this).attr("href");
			$("#myModal").modal('show');
			$("a#confirm").attr("href", href);
			return false;
		});
	});
</script>
</html>